package com.le.tester.book.effectivejava3rdchinese.secondReading.l28;

import java.util.Collection;

/**
 * createTime：2024-09-06 14:11
 * description：
 */
public class ChooserV2<T> {
    //使用泛型数组
    private final T[] choiceArray;

    public ChooserV2(Collection<T> choice) {
        //这种强转的最危险了
        choiceArray = (T[]) choice.toArray();
    }
}
